package io.noties.markwon.base.html.tag

import io.noties.markwon.base.MarkwonConfiguration
import io.noties.markwon.base.RenderProps
import io.noties.markwon.base.html.HtmlTag
import org.commonmark.node.StrongEmphasis
import java.util.*

class StrongEmphasisHandler : SimpleTagHandler() {
    override fun getSpans(
        configuration: MarkwonConfiguration,
        renderProps: RenderProps,
        tag: HtmlTag
    ): Any? {
        val spanFactory = configuration.spansFactory().get(
            StrongEmphasis::class.java
        ) ?: return null
        return spanFactory.getSpans(configuration, renderProps)
    }

    override fun supportedTags(): List<String> {
        return Arrays.asList("b", "strong")
    }
}